/* $Id: Application.java,v 1.2 2006/09/15 14:10:54 gigabass Exp $
 *
 * Copyright (c) Guido Ludwig. All rights reserved.
 * Use is subject to license terms.
 */

package de.guidoludwig.af;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JMenuBar;

/**
 * An Application can be bound into the framework
 * 
 * @author <a href="mailto:jtrade@gigabss.de">Guido Ludwig</a>
 * @version $Revision: 1.2 $
 */
public interface Application {

	/**
	 * @return the title of the application
	 */
	String getTitle();

	/**
	 * @return the application's short name to be used eg. in Menus
	 */
	String getShortName();

	/**
	 * @return the icon to be used in the frameworks navigation toolbar
	 */
	Icon getIcon();

	/**
	 * @return if the application allowes exit, eg. due to unsaved data
	 */
	boolean allowsExit();

	/**
	 * @return the applications UI, without navigation/menu/toolbar
	 */
	JComponent getComponent();

	/**
	 * @return the actions to be shown in the Main applications Toolbar.
	 */
	Action[] getToolbarActions();

	/**
	 * @return the application's menu bar
	 */
	JMenuBar getMenuBar();

	/**
	 * Activate the application. This method is always called when the
	 * application is brought to the front
	 * 
	 */
	void activate();
	

}
